package com.youi.entity;

import java.util.Date;

import com.youi.common.DelStatus;

import java.sql.*;


import java.io.Serializable;


/**
 * 系统管理员
 * @author XJY
 */
public class Sysuser implements Serializable {

	private Long id;							//ID
	private Date gmtCreated;					//创建时间
	private Integer delStatus;					//删除状态（0否 1是）
	private Date gmtModify;					    //最后修改时间
	private Long merchantId;				    //商家id
	private Long roleId;						//角色id
	private Integer type;					    //账号类型(0平台 1商家)
	private Integer role;					    //角色(0 超级管理员 1主账号 2子账号)
	private Integer openState;				    //开启状态(0关闭 1开启)
	private String account;					    //用户名
	private String password;				    //密码
	private String img;							//头像
	private String name;						//姓名
	private String remark;						//备注
	private String email;						//邮箱
	private Date gmtLastLogin;					//最后一次登录时间
	private String pms;							//权限

	private String merchantName;				//商户名称
	private String sysrolePms;					//角色权限
	private String sysroleName;					//角色名称
	
    public Sysuser(){

    }

    public Sysuser(Long id,Date gmtCreated,Integer delStatus,Date gmtModify) {
       this.id=id;
       this.gmtCreated=gmtCreated;
       this.delStatus=delStatus;
       this.gmtModify=gmtModify;
    }


    public Sysuser(Long id,Date gmtCreated,Integer delStatus,Date gmtModify,Long merchantId,Integer type,Integer role,Integer openState,String account,String password,String img,String name,String remark,Date gmtLastLogin) {
       this.id=id;
       this.gmtCreated=gmtCreated;
       this.delStatus=delStatus;
       this.gmtModify=gmtModify;
       this.merchantId=merchantId;
       this.type=type;
       this.role=role;
       this.openState=openState;
       this.account=account;
       this.password=password;
       this.img=img;
       this.name=name;
       this.remark=remark;
       this.gmtLastLogin=gmtLastLogin;
    }
    
    public Sysuser(Long merchantId,String account,String password,Integer status) {
        this.gmtCreated=new Date();
        this.delStatus=DelStatus.NODEL;
        this.gmtModify=gmtCreated;
        this.merchantId=merchantId;
        this.type=1;
        this.role=1;
        if (status!=2||status!=4) {
			this.openState=0;
		}else {
			this.openState=1;
		}
        this.account=account;
        this.password=password;
     }


	public void setId(Long id){
		this.id=id;
	}

	public Long getId(){
		return id;
	}

	public void setGmtCreated(Date gmtCreated){
		this.gmtCreated=gmtCreated;
	}

	public Date getGmtCreated(){
		return gmtCreated;
	}

	public void setDelStatus(Integer delStatus){
		this.delStatus=delStatus;
	}

	public Integer getDelStatus(){
		return delStatus;
	}

	public void setGmtModify(Date gmtModify){
		this.gmtModify=gmtModify;
	}

	public Date getGmtModify(){
		return gmtModify;
	}

	public void setMerchantId(Long merchantId){
		this.merchantId=merchantId;
	}

	public Long getMerchantId(){
		return merchantId;
	}

	public void setType(Integer type){
		this.type=type;
	}

	public Integer getType(){
		return type;
	}

	public void setRole(Integer role){
		this.role=role;
	}

	public Integer getRole(){
		return role;
	}

	public void setOpenState(Integer openState){
		this.openState=openState;
	}

	public Integer getOpenState(){
		return openState;
	}

	public void setAccount(String account){
		this.account=account;
	}

	public String getAccount(){
		return account;
	}

	public void setPassword(String password){
		this.password=password;
	}

	public String getPassword(){
		return password;
	}

	public void setImg(String img){
		this.img=img;
	}

	public String getImg(){
		return img;
	}

	public void setName(String name){
		this.name=name;
	}

	public String getName(){
		return name;
	}

	public void setRemark(String remark){
		this.remark=remark;
	}

	public String getRemark(){
		return remark;
	}

	public void setGmtLastLogin(Date gmtLastLogin){
		this.gmtLastLogin=gmtLastLogin;
	}

	public Date getGmtLastLogin(){
		return gmtLastLogin;
	}

	public String getEmail() {
		return email;
	}

	public void setEmail(String email) {
		this.email = email;
	}

	public String getPms() {
		return pms;
	}

	public void setPms(String pms) {
		this.pms = pms;
	}

	public String getMerchantName() {
		return merchantName;
	}

	public void setMerchantName(String merchantName) {
		this.merchantName = merchantName;
	}

	public Long getRoleId() {
		return roleId;
	}

	public void setRoleId(Long roleId) {
		this.roleId = roleId;
	}

	public String getSysrolePms() {
		return sysrolePms;
	}

	public void setSysrolePms(String sysrolePms) {
		this.sysrolePms = sysrolePms;
	}

	public String getSysroleName() {
		return sysroleName;
	}

	public void setSysroleName(String sysroleName) {
		this.sysroleName = sysroleName;
	}


}
